unit RepView;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, DosReport, StdCtrls;

type
  TfmRepView = class(TForm)
    Image1: TImage;
    btnPrint: TButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure btnPrintClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmRepView: TfmRepView;

implementation

{$R *.DFM}

procedure TfmRepView.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  Action := caFree;
end;

procedure TfmRepView.btnPrintClick(Sender: TObject);
begin
  (Owner as TDosReport).Print;
end;

end.
